home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 January - Disc 2 / Macworld (1999-01) (Disk 2).dmg / Mac OS 8.5 Updaters / RealPC⁄Soft Windows / SoftWindows / SoftWindows Upgrade Disk / INSIGNIA / DELREG.BAT < prev    next >
Encoding:
DOS Batch File  |  1998-08-24  |  5.8 KB  |  146 lines

  1. rem [
  2. rem    Name:        %M%
  3. rem
  4. rem    Derived from:    (original)
  5. rem
  6. rem    Author:        Clive Standbridge
  7. rem
  8. rem    Created on:    July 1997
  9. rem
  10. rem    Sccs ID:    %W% %G%
  11. rem
  12. rem    Coding Stds:    
  13. rem
  14. rem    Purpose:    Selectively deletes Windows 95 registry keys.
  15. rem
  16. rem    Parameters:    1    host OS type i.e. "mac" or "unix"
  17. rem            2    new serial number (8 hex digits)
  18. rem            3    old serial number (8 hex digits)
  19. rem            4    Host System name
  20. rem            5    Host System release
  21. rem            6    Host System version
  22. rem            7    Host System hardware type
  23. rem
  24. rem    Copyright 1997 Insignia Solutions PLC. All rights reserved.
  25. rem ]
  26.  
  27.  
  28. rem  Version stamp for SoftWindows95 4.0 Windows 95 disks.
  29. rem  If old version is lower than this then either the disk predates this
  30. rem  upgrade scheme, or we are upgrading from DOS or Windows 3.x.
  31. rem  In both cases we want to force all devices to be updated.
  32. set sw9540ver=0xF4000018
  33.  
  34. rem  Device version IDs. When a device's .INF file changes, update its
  35. rem  version ID here.
  36. set ISL060A_ver=%sw9540ver%
  37. set ISL0901_ver=0xF4000043
  38. set ISL0902_ver=%sw9540ver%
  39. set ISL0F0D_ver=%sw9540ver%
  40. set ISLA02B_ver=%sw9540ver%
  41. set ISLB007_ver=0xF4000052
  42.  
  43.  
  44. rem  Deletions: modify regedit for original Windows 95, use standard for OSR2.
  45. set regedit=regedit
  46. ver | find "4.00.950" >nul:
  47. if errorlevel 1 goto no_insreged
  48. set regedit=c:\insignia\insreged.exe
  49. c:\insignia\inspatch c:\insignia\patch.pat c:\windows\regedit.exe c:\insignia\insreged.exe    >>c:\insignia\up.log
  50. :no_insreged
  51.  
  52. rem  Mask the old version number. We are interested in the major & minor
  53. rem  revision and the OS level, but not the language.
  54. ibatch oldVersion = 0x%3 & 0xff000fff #010lx
  55.  
  56. echo %0: old serial no.="%3"  oldVersion="%oldVersion%"                    >>c:\insignia\up.log
  57.  
  58.  
  59. rem  Force Insignia drivers to be updated as necessary.
  60. rem  Devices will be updated from .INF files.
  61. rem  
  62. rem  When a device's .INF file changes, the test for whether to update
  63. rem  the device should be altered to test against the disk revision
  64. rem  corresponding to the .INF file change.
  65.  
  66.  
  67. rem  ESDI
  68. itest %oldVersion% "<" %ISL060A_ver%
  69. if errorlevel 1 %regedit% /d "HKEY_LOCAL_MACHINE\Enum\BIOS\*ISL060A"            >>c:\insignia\up.log
  70.  
  71. rem  Display
  72. REM  Don't force this while it is set up in Win95.
  73. REM  Uncomment this section if & when it is set up in DOS.
  74. REM itest %oldVersion% "<" %ISL0901_ver%
  75. REM if errorlevel 1 %regedit% /d "HKEY_LOCAL_MACHINE\Enum\BIOS\*ISL0901"            >>c:\insignia\up.log
  76.  
  77. rem  Monitor
  78. itest %oldVersion% "<" %ISL0902_ver%
  79. if errorlevel 1 %regedit% /d "HKEY_LOCAL_MACHINE\Enum\BIOS\*ISL0902"            >>c:\insignia\up.log
  80.  
  81. rem  Mouse
  82. REM  Don't force this while it is set up in Win95.
  83. REM  Uncomment this section if & when it is set up in DOS.
  84. REM itest %oldVersion% "<" %ISL0F0D_ver%
  85. REM if errorlevel 1 %regedit% /d "HKEY_LOCAL_MACHINE\Enum\BIOS\*ISL0F0D"        >>c:\insignia\up.log
  86.  
  87. rem  CD-ROM
  88. itest %oldVersion% "<" %ISLA02B_ver%
  89. if errorlevel 1 %regedit% /d "HKEY_LOCAL_MACHINE\Enum\BIOS\*ISLA02B"            >>c:\insignia\up.log
  90.  
  91. rem  Native sound
  92. itest %oldVersion% "<" %ISLB007_ver%
  93. if errorlevel 1 %regedit% /d "HKEY_LOCAL_MACHINE\Enum\BIOS\*ISLB007"            >>c:\insignia\up.log
  94.  
  95. rem  Pre-4.0 disk: clean up registry for sound drivers
  96. itest %oldVersion% "<" %sw9540ver%
  97. if not errorlevel 1 goto no_sound
  98. %regedit% /d "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\MediaResources\midi"    >>c:\insignia\up.log
  99. %regedit% /d "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\MediaResources\wave"    >>c:\insignia\up.log
  100. %regedit% /d "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\MediaResources\mixer"    >>c:\insignia\up.log
  101. :no_sound
  102.  
  103. rem  Fix Sound Blaster config (trashed by native sound driver).
  104. itest %oldVersion% ">=" %sw9540ver%
  105. if not errorlevel 1 goto no_sblast
  106. itest %oldVersion% "<"  0xF4000049
  107. if not errorlevel 1 goto no_sblast
  108. %regedit% /d "HKEY_LOCAL_MACHINE\Enum\BIOS\*PNPB001"                    >>c:\insignia\up.log
  109. %regedit% /d "HKEY_LOCAL_MACHINE\Enum\BIOS\*PNPB002"                    >>c:\insignia\up.log
  110. %regedit% /d "HKEY_LOCAL_MACHINE\Enum\BIOS\*PNPB003"                    >>c:\insignia\up.log
  111. %regedit% /d "HKEY_LOCAL_MACHINE\Enum\BIOS\*PNPB006"                    >>c:\insignia\up.log
  112. :no_sblast
  113.  
  114. call delreg_c HKEY_LOCAL_MACHINE\Enum\Root *PNP0901
  115. call delreg_c HKEY_LOCAL_MACHINE\Config\0001\Display Settings UpgradeToDefaultMode
  116.  
  117. rem  Remove WarnVerDLL entries from registry which causes warning panels to
  118. rem  appear after installing some apps. Two values, WINASPI.DLL and mcicda.drv
  119. rem  are removed. Removal of mcicda.drv has no apparent effect.
  120. %regedit% /d "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SessionManager\WarnVerDLLs"    >>c:\insignia\up.log
  121.  
  122. rem ------------------------------------------------------------------------------
  123. rem  The following adjustments are only for upgrades of Insignia Windows 95 disks.
  124. rem ------------------------------------------------------------------------------
  125. itest %oldVersion% ">=" 0xF0000000
  126. if not errorlevel 1 goto no_force
  127. ibatch oldOS = 0x%3 & 0xf000 #010lx
  128. itest %oldOS% ">="    0x3000
  129. if not errorlevel 1 goto no_force
  130.  
  131. rem --------------------------------------------------------------------
  132. rem  Remove forced configuration for display adapter ie use configuration
  133. rem  reported by our pnp bios instead.
  134. rem  - equivalent to ticking the 'Use automatic settings' box.
  135. rem  Required for upgrades from SoftWindows 95 4.0 disks.
  136. rem --------------------------------------------------------------------
  137.  
  138. %regedit% /e c:\insignia\temp1.reg "HKEY_LOCAL_MACHINE\Enum\BIOS\*ISL0901\10"    >>c:\insignia\up.log
  139. %regedit% /d                       "HKEY_LOCAL_MACHINE\Enum\BIOS\*ISL0901\10"    >>c:\insignia\up.log
  140. find /i /v """ForcedConfig""=" < c:\insignia\temp1.reg > c:\insignia\temp2.reg
  141. %regedit%    c:\insignia\temp2.reg                        >>c:\insignia\up.log
  142. echo.>>c:\insignia\up.log
  143. del          c:\insignia\temp*.reg                        >>c:\insignia\up.log
  144. :no_force
  145.  
  146.